//index.js
//获取应用实例
const app = getApp()
Page({
  data: {
    motto: 'Hello World',
    userInfo: {},
    hasUserInfo: false,
    canIUse: wx.canIUse('button.open-type.getUserInfo')
  },

  onLoad: function () {
    
  },
  onShow:function(){
    let that = this;
    app.auth.isLogin(function () {
      app.globalData.userInfo = wx.getStorageSync('storeWxUser');
      that.setData({
        motto:'auth success',
        userInfo: app.globalData.userInfo,
        hasUserInfo: true
      })
    })
  }
})
